package com.designPattern.command.command;

import com.designPattern.command.receiver.Receiver;

/**
 * @author mxs
 */
public class OnCommand implements Command{
    Receiver receiver;
    public OnCommand(Receiver receiver){
        this.receiver = receiver;
    }
    @Override
    public void execute() {
        receiver.on();
    }

    @Override
    public void undo() {
        receiver.off();
    }
}
